/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.system.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @website https://el-admin.vip
* @description /
* @author wangyu
* @date 2024-03-17
**/
@Entity
@Data
@Table(name="dis_channel_member")
public class DisChannelMember implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "channel_member_id")
    @ApiModelProperty(value = "主键ID")
    private Long channelMemberId;

    @Column(name = "member_mobile")
    @ApiModelProperty(value = "手机号")
    private String memberMobile;

    @Column(name = "member_name")
    @ApiModelProperty(value = "真实姓名")
    private String memberName;

    @Column(name = "member_nickname")
    @ApiModelProperty(value = "昵称")
    private String memberNickname;

    @Column(name = "identity_name")
    @ApiModelProperty(value = "身份名称")
    private String identityName;

    @Column(name = "channel_code")
    @ApiModelProperty(value = "渠道编码")
    private String channelCode;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Timestamp createTime;

    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Timestamp updateTime;

    @Column(name = "createby")
    @ApiModelProperty(value = "创建人")
    private String createby;

    @Column(name = "updateby")
    @ApiModelProperty(value = "更新人")
    private String updateby;

    @Column(name = "channel_member_status")
    @ApiModelProperty(value = "状态")
    private Integer channelMemberStatus;

    @Column(name = "member_openid")
    @ApiModelProperty(value = "管理员openid")
    private String memberOpenid;

    public void copy(DisChannelMember source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}